package com.ftg.learnmybatis.annotation.mapper;

import com.ftg.learnmybatis.annotation.entity.StudentEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 映射器对象
 *
 *  xml namespace  接口
 *
 * 6 :
 *
 * 5:10 (annotation .....)
 * 5.10 - 60 : 面向对象 (6)
 *
 * @author kangjx
 * @version 1.0
 * @date 2023/3/14 下午3:46
 */
public interface StudentMapper {

    @Select("select * from student")
    List<StudentEntity> showList();

    @Insert("insert into student(sno,sname,ssex,sage) values(#{sno},#{sname},#{ssex},#{sage})")
    int saveStudent(StudentEntity stu);

}
